/*
11. Write an expression that extracts from a given integer i the value of a given bit number b. Example: i=5; b=2 ? value=1.
*/
using System;

class IsInCircleOutOfRectangle
    {
        static void Main()
        {
            Console.Write("Enter an integer: ");
            int checkedNumber = int.Parse(Console.ReadLine());

            Console.Write("Enter an integer: ");
            int checkedPosition = int.Parse(Console.ReadLine());
			
			int mask = 1<<checkedPosition;
			int bit = (checkedNumber & mask) >> checkedPosition;
            Console.WriteLine("The bit at position {0} is {1}",checkedPosition,bit);      
        }
    }